package com.yx.changdao.generate.main;

import com.yx.changdao.generate.model.CreateCodeParam;
import com.yx.changdao.generate.model.DataDictParam;
import com.yx.changdao.generate.utils.CodeGenerateUtils;

/**
 * @Description: <br/>
 * 单表代码生成器
 * <p>
 * <br/>
 * @Auther: zhangqi
 * @create 2019/11/26 10:01
 */
public class GenerateMain {
    /**
     * 运行方法
     *
     * @param args
     */
    public static void main(String[] args) {
        /**
         * "community_build", "community_build_detail", "community_resident"
         * , "department", "grid_info", "problem", "problem_change_apply", "problem_records"
         * , "problem_result_records","worker"
         */
        String[] tableName = new String[]{"within_letter"};
        for (String table : tableName) {
            // 生成参数的实体
            CreateCodeParam createCodeParam = new CreateCodeParam();
            // 作者
            createCodeParam.setAuthor("walter");
            // 数据库地址   IP:端口/数据库名
            createCodeParam.setURL("pos.xvo2o.com:3306/serveMasses");
            // 数据库用户名
            createCodeParam.setUser("serveMasses");
            // 数据库密码
            createCodeParam.setPassword("Root01");
            // 表名
            createCodeParam.setTableName(table);
            // 生成
            CodeGenerateUtils.generateOneTable(createCodeParam);
        }

    }

}
